Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Aligning Windows


DragAlignedGrayRgn

The DragAlignedGrayRgn function drags the specified gray region along an optimal alignment grid.

pascal long DragAlignedGrayRgn (RgnHandle theRgn, Point startPt,
                           Rect *boundsRect, Rect *slopRect,
                           short axis, ProcPtr actionProc,
                           Rect *alignmentRect,
                           AlignmentProcRecordPtr alignmentProc);
theRgn
Contains a region handle to the specified region for this operation. When the user holds down the mouse button, DragAlignedGrayRgn pulls a gray outline of the region around following the movement of the mouse until the mouse button is released.
startPt
Specifies the point where the mouse button was originally pressed in the local coordinates of the current graphics port.
boundsRect

Contains a pointer to the boundary rectangle of the current graphics port. The offset point follows the mouse location except that DragAlignedGrayRgn never moves the offset point outside this rectangle. This limits the travel of the region's outline, not the movements of the mouse.
slopRect
Contains a pointer to the slop rectangle that completely encloses the boundary rectangle so that the user is allowed some flexibility in moving the mouse.
axis
Allows you to constrain the region's motion to only one axis. Set this parameter to 0 to specify no constraint. To indicate constraint along
a horizontal axis, set this parameter to 1. To indicate constraint along a vertical axis, set this parameter to 2. See Inside Macintosh: Macintosh ToolBox Essentials Essentials for details on the constants for the axis parameter of the Window Manager's DragGrayRgn routine.
actionProc
Points to a function that defines some action to be performed repeatedly as long as the user holds down the mouse button. The function should have no parameters. If the actionProc parameter is nil, DragAlignedGrayRgn simply retains control until the mouse button is released.
alignmentRect

Contains a pointer to a rectangle within the bounds of the region specified in the parameter theRgn. Pass nil to align using the bounds of the parameter theRgn.
alignmentProc
Points to your own alignment behavior function. Pass nil to use the standard behavior. Your alignment function must be in the following form:
pascal void MyAlignmentProc (Rect *rp, long refcon);

See "Alignment Functions" on page 3-149 for details.
DESCRIPTION
The DragAlignedGrayRgn function is not normally made directly. The DragAlignedWindow function (described on page 3-138) calls this function.

SEE ALSO
The DragAlignedGrayRgn function is nearly identical to the Window Manager's DragGrayRgn routine. See Inside Macintosh: Macintosh ToolBox Essentials Essentials for
details on DragGrayRgn.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996